<?php
/**
 * 定义 Table_Attachments 类
 *
 * @copyright Copyright (c) 2009 iTeam
 * @author sunnycoolboy
 * @package leadtone
 * @version Attachments.php 2009-03-31
 */
FLEA::loadClass('FLEA_Db_TableDataGateway');
class Table_Attachments extends FLEA_Db_TableDataGateway
{
    /**
     * 数据表名称
     *
     * @var string
     */
    var $tableName = 'attachments';

    /**
     * 主键字段名
     *
     * @var string
     */
    var $primaryKey = 'atid';
    /**
     * 附件图片属于文章
     *
     * @var array
     */
    var $belongsTo = array(
    	array(
	        'tableClass' => 'Table_Categories',
			'foreignKey' => 'articleid',
	        'mappingName' => 'article'
	        ),
        array(
		   'tableClass' =>'Model_Admin',
		   'foreignKey' =>'aid',
		   'mappingName'=>'admin'
		  ),
    );
}
